import request from '@/utils/request'

// 查询ERP系统字典数据列表
export function listDict(query) {
  return request({
    url: '/distribution/dict/list',
    method: 'get',
    params: query
  })
}

// 查询ERP系统字典数据详细
export function getDict(dictCode) {
  return request({
    url: '/distribution/dict/' + dictCode,
    method: 'get'
  })
}

// 新增ERP系统字典数据
export function addDict(data) {
  return request({
    url: '/distribution/dict',
    method: 'post',
    data: data
  })
}

// 修改ERP系统字典数据
export function updateDict(data) {
  return request({
    url: '/distribution/dict',
    method: 'put',
    data: data
  })
}

// 删除ERP系统字典数据
export function delDict(dictCode) {
  return request({
    url: '/distribution/dict/' + dictCode,
    method: 'delete'
  })
}
